import config from "@/config"
import http from "@/utils/request"

export default {
    addDictType: {
        url: `${config.API_URL}/platform/dict/type/add`,
        name: "新增字典类型",
        post: function (platformDictTypeAddVo) {
            return http.post(this.url, platformDictTypeAddVo);
        }
    },
    delDictTypes: {
        url: `${config.API_URL}/platform/dict/type/del`,
        name: "多选级联删除字典类型",
        delete: function (dictIds) {
            return http.delete(this.url, dictIds);
        }
    },
    editDictType: {
        url: `${config.API_URL}/platform/dict/type/edit`,
        name: "修改字典类型信息",
        put: function (platformDictTypeEditVo) {
            return http.put(this.url, platformDictTypeEditVo);
        }
    },
    getDictTypeById: {
        url: `${config.API_URL}/platform/dict/type/info`,
        name: "根据ID获取字典类型详情",
        get: function (dictId) {
            return http.get(this.url + "/" + dictId);
        }
    },
    pageListDictType: {
        url: `${config.API_URL}/platform/dict/type/pageList`,
        name: "分页查询字典类型列表",
        get: function (platformDictTypeQueryVo) {
            return http.get(this.url, platformDictTypeQueryVo);
        }
    },
    addDictData: {
        url: `${config.API_URL}/platform/dict/data/add`,
        name: "新增字典值",
        post: function (platformDictDataAddVo) {
            return http.post(this.url, platformDictDataAddVo);
        }
    },
    delDictDatas: {
        url: `${config.API_URL}/platform/dict/data/del`,
        name: "多选级联删除字典值",
        delete: function (dataIds) {
            return http.delete(this.url, dataIds);
        }
    },
    editDictData: {
        url: `${config.API_URL}/platform/dict/data/edit`,
        name: "修改字典值信息",
        put: function (platformDictDataEditVo) {
            return http.put(this.url, platformDictDataEditVo);
        }
    },
    getDictDataById: {
        url: `${config.API_URL}/platform/dict/data/info`,
        name: "根据ID获取字典值详情",
        get: function (dataId) {
            return http.get(this.url + "/" + dataId);
        }
    },
    pageListDictData: {
        url: `${config.API_URL}/platform/dict/data/pageList`,
        name: "分页查询字典值列表",
        get: function (platformDictDataQueryVo) {
            return http.get(this.url, platformDictDataQueryVo);
        }
    }
}
